package com.liuc.practice.ipersistent.config;

import com.liuc.practice.ipersistent.utils.ParameterMapping;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 将查询参数与参数值匹配起来
 *
 * @Author Liu Chang
 * @Date 2020/12/13 10:46 下午
 */
@Data
public class BoundSql {
    private String parsedSql;

    private List<ParameterMapping> classAttributeNames;

    public BoundSql(String parsedSql, List<ParameterMapping> classAttributeNames){
        this.parsedSql = parsedSql;
        if (classAttributeNames == null) {
            this.classAttributeNames = new ArrayList<>();
        }
        this.classAttributeNames = classAttributeNames;
    }
}
